package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkIssueApply;
import com.ysd.lis.request.IssueApplyParam;
import com.ysd.lis.service.WkIssueApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author peng
 * @since 2024-04-07
 */
@Api(tags = "问题处理")
@RestController
@RequestMapping("/api/wk/wkIssueApply")
public class WkIssueApplyController extends BaseController {

    @Autowired
    WkIssueApplyService wkIssueApplyService;

    @ApiOperation("分页查询")
    @GetMapping("/findIssueApplyPageList")
    public Result findIssueApplyPageList(IssueApplyParam pageParam){
        return wkIssueApplyService.findIssueApplyPageList(pageParam);
    }

    @ApiOperation("新增")
    @PostMapping("/addIssueApply")
    public Result addIssueApply(@RequestBody WkIssueApply wkIssueApply){
        return  wkIssueApplyService.addIssueApply(wkIssueApply);
    }

    @ApiOperation("修改")
    @PostMapping("/editIssueApply")
    public Result editIssueApply(@RequestBody WkIssueApply wkIssueApply) {
        return wkIssueApplyService.editIssueApply(wkIssueApply);
    }
    @ApiOperation("根据详情id删除")
    @PostMapping("/deleteIssueApply")
    public Result deleteIssueApply(@RequestBody WkIssueApply wkIssueApply) {
        return wkIssueApplyService.deleteIssueApply(wkIssueApply);
    }
    @ApiOperation("根据详情id退回")
    @PostMapping("/reBackIssueApply")
    public Result reBackIssueApply(@RequestBody WkIssueApply wkIssueApply) {
        return wkIssueApplyService.reBackIssueApply(wkIssueApply);
    }
    @ApiOperation("根据详情id撤回")
    @PostMapping("/revokeIssueApply")
    public Result revokeIssueApply(@RequestBody WkIssueApply wkIssueApply) {
        return wkIssueApplyService.revokeIssueApply(wkIssueApply);
    }


    @ApiOperation("根据ID查询")
    @GetMapping("/getIssueApplyById")
    public Result getIssueApplyById(String id){
        return wkIssueApplyService.getIssueApplyById(id);
    }
}
